Software applications running on a computing device require accessing data stored in a data store, which may be a part of the computing device or may be connected to the computing device over a network. To increase processing efficiency while accessing the required data, data can be cached. In caching, an application checks for required data in a cache, which can be accessed faster than the data store of the computing device, before accessing the data store. If the required data exists in the cache, which is referred to as a “cache hit,” the application accesses that data from the cache. If the data does not exist in the cache, which is referred to as a “cache miss”, the application accesses that data from the data store and optionally, caches the data for subsequent use.
Usually, caching of data associated with an application is implemented in an original code of the application. The logic behind the caching is determined at the time of developing the application. If the caching logic needs to be modified or a new caching logic needs to be introduced at a later stage due to various requirements, the original code needs to be modified accordingly. For example, a developer of the application may have to modify the existing caching logic or include additional code for implementing the new caching logic and include that additional code in the original code.
Each time caching is implemented for the application, the application code must be modified and the re-compiled application tested again before it is deployed for practical use. Further, during the run time of the application, if anomalies are found in the application behavior, the application code must be fixed and the application tested again before being redeployed. In addition, because it is difficult to predict the changing caching needs of the application in advance, an analysis of the changing cache pattern needs to be done and the application code needs to be recompiled every time changes in caching patterns are encountered. This further leads to multiple code modification and testing cycles.